==============================================
Automatic_CacheClear_for_koobi_5.4.pro_by_Nulled
For Koobi 5.4 Pro 
Written by Dmitry Mayatskyy (Nulled).
[http://www.cathedral.net.ua]
==============================================

   koobi ,             
   "  *****"     FTP     .
    -         
   -,  koobi    .
          cron daemon'a,     
   . 

  :
1.    /inc/init.php
2.  :

if (empty($_REQUEST['area']))
{
	if (!empty($_SESSION['Koobi_Area']))
		$_REQUEST['area'] = $_SESSION['Koobi_Area'];
    else
		$_REQUEST['area'] = 1;
$_SESSION['Koobi_Area'] = $_REQUEST['area'];
$_REQUEST['area'] = (int) $_REQUEST['area']; 
}

 :

//=================================================================
// Automatic clear cache.
// For Koobi 5.4 Pro 
// Written by Dmitry Mayatskyy (Nulled).
// [http://www.cathedral.net.ua]
//=================================================================
$sql = $db->Query("SELECT SUM(hits) as HITSTODAY FROM " . PREFIX . "_sitestats WHERE datum='" . date("d-m-Y") . "'");
$row_hits = $sql->fetchrow();
if ($row_hits->HITSTODAY =='2')
	{

	// <<-- CLEAR CACHE -->>
	@ini_set("max_execution_time",15);
	$verzname = BASEDIR . '/cache/';
		$dh = opendir( $verzname );
		$sel = "";
	
		while ( @gettype( $datei = @readdir ( $dh )) != boolean ){
			if ( is_file( "$verzname/$datei" ))
			if ($datei != "." && $datei != "..") {
				@unlink($verzname . $datei);
				} 
			}
		@closedir( $dh );

	// <<-- CLEAR TEMPLATE CACHE -->>
	$verzname = BASEDIR . '/temp/' . $_REQUEST['area'] . '/';
		$dh = opendir( $verzname );
		$sel = "";
		
		while ( @gettype( $datei = @readdir ( $dh )) != boolean ){
			if ( is_file( "$verzname/$datei" ))
			if ($datei != "." && $datei != "..") {
				@unlink($verzname . $datei);
				} 
			}
		@closedir( $dh );	

	// <<-- CLEAR SQL CACHE -->>
	$verzname = BASEDIR . '/cache/sql/';
		$dh = opendir( $verzname );
		$sel = "";
	
		while ( @gettype( $datei = @readdir ( $dh )) != boolean ){
			if ( is_file( "$verzname/$datei" ))
			if ($datei != "." && $datei != "..") {
				@unlink($verzname . $datei);
				} 
			}
		@closedir( $dh );
	}
//=================================================================



  :          (   = 2), 
    
    /cache/, /temp/(_)/  /cache/sql/.   
     .

  (/cache/sql/)  ,     sql  Siverstorm'a.
         ,         4-5 .
       -   :

	// <<-- CLEAR SQL CACHE -->>
	$verzname = BASEDIR . '/cache/sql/';
		$dh = opendir( $verzname );
		$sel = "";
	
		while ( @gettype( $datei = @readdir ( $dh )) != boolean ){
			if ( is_file( "$verzname/$datei" ))
			if ($datei != "." && $datei != "..") {
				@unlink($verzname . $datei);
				} 
			}
		@closedir( $dh );


 .


Enjoy!
Nulled.